<?
$domain_action = $GLOBALS['dom_action'];
$domain_name = $GLOBALS['domain_name'];
$ns_types = $GLOBALS['ns_types'];
$ns_type = $GLOBALS['ns_type'];
$products = $GLOBALS['products'];
$mail_server = $GLOBALS['mail_server'];
//$vat_registered

$prod = $GLOBALS['dns_products']->product[($GLOBALS['rp_products'][$products])];
$dom = $GLOBALS['dns_products']->product[($GLOBALS['rp_products']['p3'])];
$domain_action_map = array('available'=>'Registration', 'notavailable'=>'Transfer', 'renewal'=>'Renewal', 'addmdns1'=>'Renewal', 'addmdns2'=>'None');

$amount_total = sprintf("%01.2f", 0);
if($domain_action != 'addmdns2'){
        $dom_price = sprintf("%01.2f", $dom->getPriceByType());
}else{
        $dom_price = sprintf("%01.2f", 0);
}

if($products != 'p3'){
        $prod_price = sprintf("%01.2f", $prod->getPriceByType());
}else{
        $prod_price = sprintf("%01.2f", 0);
}

$amount_total = sprintf("%01.2f", ($prod_price + $dom_price));

?>
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td align="left"><strong>Domain look-up, Registration or Transfer</strong></td>
	<td align="right"><a href="domain/faq.html?tab=mail_cluster" target="_blank">Help/ F.A.Q.</a></td>
	<td align="right"><a href="domain/faq.html?tab=tutorials" target="_blank">Tutorials</a></td>
  </tr>
</table>
<table class="reg_table" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td align="center"><img src="domain/images/ico_step_5_5.gif" alt="Step 5"></td>
	<td>&nbsp;</td>
  </tr>
  <tr>
	<td align="center"><img src="domain/images/ico_completed_step.gif" alt="Step Completed" width="37" height="36"></td>
	<td align="left">Search</td>
	<td align="center"><img src="domain/images/ico_completed_step.gif" alt="Step Completed" width="37" height="36"></td>
	<td align="left">Set Purpose</td>
	<td align="center"><img src="domain/images/ico_completed_step.gif" alt="Step Completed" width="37" height="36"></td>
	<td align="left">Mailbox</td>
	<td align="center"><img src="domain/images/ico_completed_step.gif" alt="Step Completed" width="37" height="36"></td>
	<td align="left">Whois</td>
	<td align="center"><img src="domain/images/ico_current_step.gif" alt="Current Step" width="37" height="36"></td>
	<td align="left">Payment</td>
  </tr>
</table>
<br /><br />
<div style="background-color:#DCDCDC;padding-top:3px;padding-bottom:3px;padding-left:10px;">&nbsp;&nbsp;<strong><strong class="red">STEP 5</strong>: Select Payment Method</strong></div>
<br />
<table class='bTable' cellspacing="0" cellpadding="0" width="100%">
		  <tr>
			<th>Item</th>
			<th>Action</th>
			<th>Period</th>
			<th width="110">Amount</th>
		  </tr>
		  <tr>
			<td><strong><? echo $domain_name; ?></strong></td>
			<td align="center"><? echo $domain_action_map[$domain_action]; ?></td>
			<td align="center">12 months</td>
			<td align="right" style="padding-right:40px;">$<? echo $dom_price; ?></td>
		  </tr>
<?
if($products != 'p3'){
?>
		  <tr>
			<td><strong><? echo $prod->name; ?></strong><br>
			<? echo $ns_types[$ns_type]; ?>1.<? echo $domain_name; ?><br>
			<? echo $ns_types[$ns_type]; ?>2.<? echo $domain_name; ?></td>
			<td align="center">Activation</td>
			<td align="center">12 months</td>
			<td align="right" style="padding-right:40px;">$<? echo $prod_price; ?></td>
		  </tr>
<?
	if($mail_server == 'yes'){
?>
		  <tr>
			<td><strong>Mail Server</strong><br>
			mail.<? echo $domain_name; ?></td>
			<td align="center">Activation</td>
			<td align="center">12 months</td>
			<td align="right" style="padding-right:40px;">$0.00</td>
		  </tr>
<?
	}
}
?>
		  <tr bgcolor="#CCCCCC">
			<td align="right" colspan="3">SUBTOTAL:<br>
			VAT @ 17.5%:</td>
			<td align="right" style="padding-right:40px;">$<? echo $amount_total; ?><br>
			$0.00</td>
		  </tr>
		  <tr bgcolor="#ffa36a">
			<td align="right" colspan="3"><strong>TOTAL DUE:</strong></td>
			<td align="right" style="padding-right:40px;"><strong>$<? echo $amount_total; ?></strong></td>
		  </tr>
		</table>
<br /><br />
<form name=sform id=sform onSubmit='return false;'>
	<table width="440" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="117">Please select one:</td>
		<td>
			<span onClick="document.getElementById('cc').click();" id="selected_cc" style="font-weight:bold;"><input align="absmiddle" type="radio" name="payment_method" value="cc" id="cc" onClick="setPM(this);" checked> Credit Card</span>
			<span onClick="document.getElementById('pp').click();" id="selected_pp"><input align="absmiddle" type="radio" name="payment_method" value="pp" id="pp" onClick="setPM(this);"> PayPal</span>
			<span onClick="document.getElementById('wallet').click();" id="selected_wallet"><input align="absmiddle" type="radio" name="payment_method" value="wallet" id="wallet" onClick="setPM(this);">Wallet</span>
		</td>
	  </tr>
	  <tr>
		<td align="center" colspan="7"><img src="domain/images/cc_logos_payment_001.gif" alt="Credit Cards" width="419" height="32"></td>
	  </tr>
	</table>
	<p align="center"><input align="absmiddle" type="checkbox" name="terms" value="yes">
	I agree with your <a href="domain/tos.html" target='_blank'>Terms &amp; Conditions</a> and <a href="#" onClick="window.open('domain/refund_cancelation_policy.html','','height=420,width=480,scrollbars=yes');return false;">Cancellation/Refund Policy</a>.</p>
	<br />
	<p align="center">
	<? if($domain_action == 'renewal'){ ?>
	<input type="button" value="&laquo; Go Back" onClick="LoadPage('myDomains','');">&nbsp;&nbsp;&nbsp;
	<? }elseif($domain_action == 'addmdns1' or $domain_action == 'addmdns2'){ ?>
	<input type="button" value="&laquo; Go Back" onClick="chooseDomain(document.getElementById('params').value);">&nbsp;&nbsp;&nbsp;
	<? }else{ ?>
	<input type="button" value="&laquo; Go Back" onClick="mailBox(document.getElementById('params').value);">&nbsp;&nbsp;&nbsp;
	<? } ?>
	<input type="submit" value="NEXT &raquo; Submit Payment" onClick="submitPayment(fetchForm());">
	</p>
	<input type=hidden name=params id=params>
</form>
<br />